setTextStyle

Syntax: setTextStyle document, styleString

This command sets the text style that will be applied to non-styled text data (such as strings) that are subsequently appended to the document object. The values for textStyle correspond exactly to the Director "textStyle" property. Possible values for text styles are:

normal
plain
bold
italic
underline

On the Macintosh, the following additional styles are available:

outline
condense
extend
shadow

All values except normal or plain are added together in a call to setTextStyle, so you can combine a number of styles together in a single call.

Example:

The following example creates a PrintOMatic document, sets the default font to bold italicized 10 point Helvetica, and prints a short text string:

set doc = new(xtra "PrintOMatic")
if not objectP(doc) then exit
setTextStyle doc, "bold, italic"
setTextFont doc, "Helvetica"
setTextSize doc, 10
append doc, "Some sample text to print out."
if doJobSetup(doc) then print doc
set doc = 0